/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/03/23
\**********************/
#include "App.h"
#include "wnd/NewOpen.h"
#include "wnd/FloatBtn.h"

FloatBtn* App::m_FloatBtn = nullptr;
NewOpen* App::m_NewOpen = nullptr;

void App::ShowFloatBtn()
{
    if (!m_FloatBtn) {
        m_FloatBtn = (FloatBtn*) SDPtr->AddWindow(new FloatBtn(_T("FloatBtn")), true);
        m_FloatBtn->Create(NULL, NULL, UI_WNDSTYLE_FRAME, WS_EX_TOPMOST | WS_EX_TOOLWINDOW);
        m_FloatBtn->CenterWindow();
    }
    m_FloatBtn->ShowWindow();
}

void App::ShowNewOpen()
{
    if (!m_NewOpen) {
        m_NewOpen = (NewOpen*) SDPtr->AddWindow(new NewOpen(_T("NewOpen")), true);
        m_NewOpen->Create(NULL, NULL, UI_WNDSTYLE_FRAME, 0);
        m_NewOpen->CenterWindow();
    }
    m_NewOpen->ShowWindow();
}